<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../../../assets/docs.css" rel="stylesheet" type="text/css" media="screen" />
<title>MooTools 1.3 Documentation - Element/Element.Event.Pseudos.Keys</title>
</head>

<body>
  <div class="doc">
    <div class="methods">
      <h4 class="menu-item"><a href="#Pseudos">Pseudos</a></h4>
      <div class="menu-item"><a href="#Pseudos:keys">keys</a></div>
      <div class="menu-item"><a href="#"></a></div>
    </div>
    <div class="l-border r-border span-15 content">
      <h1 id="Pseudos"><a href="#Pseudos">Element.Event.Pseudo :keys</a></h1>
      <p class="description">Defines the <code>:keys</code> Element Event Pseudo. It captures key combinations and fires an event when all keys are pressed.</p>
      <h3>See Also</h3>
      <ul>
        <li><a href="../../../docs/more/Element/Element.Event.Pseudos.html">Element.Event.Pseudos</a></li>
        <li><a href="../../../docs/more/Interface/Keyboard.html">Keyboard</a></li>
      </ul>
      <h3>Note</h3>
      <ul>
        <li>This plugin adds some common used keys to the keys you can use, like <code>-</code>, <code>end</code> or <code>=</code>. See for the complete list below.</li>
      </ul>
      <h2 id="Pseudos:keys"><a href="#Pseudos:keys">Pseudo: keys</a></h2>
      <p class="description">The event will only fire when a key combination is pressed. This only works with the <code>keydown</code> and <code>keyup</code> events.</p>
      <h3>Example</h3>
      <pre class="javascript">myElement.<span class="me1">addEvent</span><span class="br0">(</span><span class="st0">'keydown:keys(shift+a+b)'</span>, <span class="kw2">function</span><span class="br0">(</span><span class="br0">)</span><span class="br0">{</span>

    <span class="kw3">alert</span><span class="br0">(</span><span class="st0">'You pressed the following keys: shift, a and b'</span><span class="br0">)</span>;
<span class="br0">}</span><span class="br0">)</span>;
</pre>
      <h2><a href="#">Element Event Keys</a></h2>
      <p class="description">The following list is a list of the special characters you can use besides the alpha-numerical characters like a, b, 1 and 3.</p>
      <ul>
        <li>enter</li>
        <li>up</li>
        <li>down</li>
        <li>left</li>
        <li>right</li>
        <li>esc</li>
        <li>space</li>
        <li>backspace</li>
        <li>tab</li>
        <li>delete</li>
        <li>shift</li>
        <li>control</li>
        <li>alt</li>
        <li>capslock</li>
        <li>pageup</li>
        <li>pagedown</li>
        <li>end</li>
        <li>home</li>
        <li>numlock</li>
        <li>scrolllock</li>
        <li>;</li>
        <li>=</li>
        <li>,</li>
        <li>-</li>
        <li>.</li>
        <li>/</li>
        <li>`</li>
        <li>[</li>
        <li>\</li>
        <li>]</li>
        <li>'</li>
        <li>+</li>
      </ul>
    </div>
  </div>
<script type="text/javascript" src="../../../assets/mootools-core-1.3.js"></script>
<script type="text/javascript" src="../../../assets/mootools-more-smoothscroll.js"></script>
<script type="text/javascript" src="../../../assets/doc-assist.js"></script>
</body>
</html>
